<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<meta charset="utf-8">
<title>订单详情</title>
<link  type="text/css" rel="stylesheet"  href="<%=request.getContextPath()%>/static/index/css/style.css"/>
<link  type="text/css" rel="stylesheet"  href="<%=request.getContextPath()%>/static/index/css/index.css"/>
<script  src="/static/js/jquery.min.js"></script>
<!-- 动态菜单JS -->
<script type="text/javascript"  src="/static/js/menu.js"></script>
    <script type="text/javascript" src="/static/js/bootstrap.js"></script>

</head>

<body>
<script>

    function del(PHONE) {
        if (confirm("是否确认删除？")){
            window.location.href="/Customer/Customerdel?PHONE="+PHONE;
        }
        /*alert("确定删除");*/
    }
    window.onload=function () {
        var meg=$("#meg").val();
        if(meg=="del"){
            alert("删除成功！")
        }
    }
    /*修改*/
    function set(PHONE) {
        if (confirm("确定修改吗？")){
            /*window.location.href="/user/userdel?username="+PHONE;*/
            alert("是的");
        }

    }
    /*搜索*/
    function submit() {
        alert("搜索");
    }

    /*获取会员下拉框值*/

    /*  var  myselect=document.getElementById("huiyuan");//拿到select对象
      var index=myselect.selectedIndex;//拿到选中项的索引
      myselect.options[index].value;//拿到选中项options的value
      myselect.options[index].text;//拿到选中项options的text*/

    function xuanzhong(){
        var  myselect=document.getElementById("huiyuan");//拿到select对象
        var index=myselect.selectedIndex;//拿到选中项的索引
        // var index=myselect.selectedIndex;//拿到选中项的索引
        var zhi= myselect.options[index].text;
        location.href="${pageContext.request.contextPath }/Customer/CustomerSe?zhi="+zhi;

    }

</script>

<div class="container">
 <%--顶部公共部分--%>
 <jsp:include page="common/top.jsp" />
 <div class="left-menu" style="height:949px;">
  <%--左侧菜单列表--%>
  <jsp:include page="common/left-menu-list.jsp" />
 </div>
     <input type="hidden" value="${meg}" id="meg">
 <div class="right-menu">
  <div class="main-hd">
   <div class="page-teb" >
    <div class="l-tab-links">
     <ul style="left:0;">
      <li class="l-select">
       <a href="/user/index">首页</a>
      </li>
       <li class="l-select">
       <a href="#">员工管理</a>
      </li>
     </ul>
    </div>

    <div class="l-tab-content" style="background:#fff;">
     <div class="tab-content-item">
      <div class="home">
      <!--员工管理   开始-->
        <div class="yg-gl">
         <div class="yg-add">
      <%--    <button  class="ui-xz" data-method="offset" >新增</button>
          <button  class="ui-xz1" data-method="offset" >删除</button>
          <button  class="ui-xz2" data-method="offset" >编辑</button>--%>
          <div style="position: absolute;left: 20px" >
          <img src="/static/index/img/icon_face_default.png" style="height: 50%" width="40%" >
          </div>
        <div style="position: absolute;left: 95px;top:30px;" >
         <img src="/static/index/img/logo.PNG" style="height: 50%" width="85%" >
        </div>
          <!--时间-->


          <%--分类搜索--%>
          <form action="${pageContext.request.contextPath }/Orders/OrdersName" method="Get"
                style="padding-top: 10px;">
              <div style="position:absolute;right: 100px;top: 20px;font-size: 16px">
                  <input style="border: 1px solid;color: #0FB9EF" placeholder="请输入客户姓名"  value="${name}"   type="text" name="name">
                  <button type="submit">搜索</button>
                <%--  <a href="/user/usersave">新增</a>--%>
              </div>
           </form>
         </div>
         <div class="yg-tab">
          <div class="grid">
          <div class="layoutitem" style="width:100%;border:none;">
           <form method="post"> 
            <table class="gridbar" border="0" cellpadding="0" cellspacing="0">
            <thead>
            <tr>
             <th>订单号</th>
             <th>支付金额</th>
             <th>支付时间</th>
             <th>客户姓名</th>
             <th>状态</th>
             <th>创建时间</th>
                <th>更新时间</th>
             <th style="color: #1c2b36">删除</th>
             <th style="color: #1c2b36">修改</th>
            </tr>
            <c:forEach var="list" items="${list}">
            <tr>

              <td>${list.orders_number}</td>
              <td>${list.pay_price}</td>
              <td>${list.pay_time}</td>
              <td>${list.customer_name}</td>
              <td>${list.status}</td>
              <td>${list.create_time}</td>
              <%--<td>${list.update_time}</td>--%>


                <td>
                <button class="btn btn-primary">
                    <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
                    编辑
                </button>
                </td>
           <%--   <td>
                    <button class="btn btn-danger" >
                        <a href="#" onclick="del('${list.PHONE}')">
                    <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                    删除
                        </a>
                </button></td>--%>
              <td  style="background-color: #9ddcfb;align-content: center"> <a href="#" onclick="">删除</a></td>
            <%-- <td  style="background-color: #9ddcfb;align-content: center"> <a href="#" onclick="set('${list.PHONE}');">修改</a></td>--%>
            </tr>
            </c:forEach>
             </thead>
            </table>
            </form>
           </div>
        <%--  <div class="pagin">
    	   <div class="message">共<i class="blue">1256</i>条记录，当前显示第&nbsp;<i class="blue">2&nbsp;</i>页</div>
            <ul class="paginList">
             <li class="paginItem"><a href="#"><span class="pagepre"><img src="/static/index/img/jt1.png"></span></a></li>
             <li class="paginItem"><a href="#">1</a></li>
             <li class="paginItem current"><a href="#">2</a></li>
             <li class="paginItem"><a href="#">3</a></li>
            <li class="paginItem"><a href="#">4</a></li>
            <li class="paginItem"><a href="#">5</a></li>
            <li class="paginItem more"><a href="#">...</a></li>
            <li class="paginItem"><a href="#">10</a></li>
            <li class="paginItem"><a href="#"><span class="pagenxt"><img src="/static/index/img/jt.png"></span></a></li>
           </ul>
          </div>--%>
              <link  type="text/css" rel="stylesheet"  href="<%=request.getContextPath()%>/static/css/bootstrap.css"/>

              <style>
                  .container{
                      background: #FFFFFF;
                      width: 100%;
                      height: 50%;
                      padding: 0;

                  }
                  th{
                      text-align: center;
                  }

              </style>

              <%--分页位--%>
              <!--显示分页信息-->
              <div class="row">
                  <!--文字信息-->
                  <div class="col-md-6">
                      <br>
                      当前第 ${pageInfo.pageNum} 页.总共 ${pageInfo.pages} 页.一共 ${pageInfo.total} 条记录
                  </div>

                  <!--点击分页-->
                  <div class="col-md-6">
                      <nav aria-label="Page navigation">
                          <ul class="pagination">

                              <li><a href="${pageContext.request.contextPath}/Customer/CustomerPhone?pageNum=1">首页</a></li>

                              <!--上一页-->
                              <li>
                                  <c:if test="${pageInfo.hasPreviousPage}">
                                      <a href="${pageContext.request.contextPath}/Customer/CustomerPhone?pageNum=${pageInfo.pageNum-1}" aria-label="Previous">
                                          <span aria-hidden="true">«</span>
                                      </a>
                                  </c:if>
                              </li>

                              <!--循环遍历连续显示的页面，若是当前页就高亮显示，并且没有链接-->
                              <c:forEach items="${pageInfo.navigatepageNums}" var="page_num">
                                  <c:if test="${page_num == pageInfo.pageNum}">
                                      <li class="active"><a href="#">${page_num}</a></li>
                                  </c:if>
                                  <c:if test="${page_num != pageInfo.pageNum}">
                                      <li><a href="${pageContext.request.contextPath}/Customer/CustomerPhone?pageNum=${page_num}">${page_num}</a></li>
                                  </c:if>
                              </c:forEach>

                              <!--下一页-->
                              <li>
                                  <c:if test="${pageInfo.hasNextPage}">
                                      <a href="${pageContext.request.contextPath}/Customer/CustomerPhone?pageNum=${pageInfo.pageNum+1}"
                                         aria-label="Next">
                                          <span aria-hidden="true">»</span>
                                      </a>
                                  </c:if>
                              </li>
                              <li><a href="${pageContext.request.contextPath}/Customer/CustomerPhone?pageNum=${pageInfo.pages}">尾页</a></li>
                          </ul>
                      </nav>
                  </div>
              </div>

                 <%--分页位置--%>
          </div>
         </div>
        </div>

      <!--员工管理   结束-->
      </div>
     </div>
    </div>
   </div>
  </div>
 </div>
</div>
  
</body>
</html>
